package com.gxa.eurekaclient.controller;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


@RestController
public class MyController {
    @RequestMapping(value = "/login",method = {RequestMethod.GET, RequestMethod.POST},
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Map<String,Object> check(String username) {
        Map<String,Object> map = new HashMap<>();
        map.put("code",200);
        map.put("msg","8762登录成功");
        map.put("name",username);
        return map;
    }
}
